/* $Header: beep.h,v 2.2 01/10/02 10:30:12 przybyls Exp $ */

/***************************************************/
/* beep.h - header file for audio beeper functions */
/*                                                 */
/* John DeGood; October 1992                       */
/***************************************************/

/**********/
/* MACROS */
/**********/

/* BeepBeep parameters : priority (0 = lowest, 255 = highest)
**			 period (msec)
**			 cycles (0 = continuous)
**			 number of tone definitions that follow:
**			 {
**				freq (Hz)
**				ontime (msec relative to start of cycle)
**				offtime (msec relative to start of cycle)
**			 }
**
** Current IQ implementation limitations:
**      - Frequency is rounded to nearest IQ hardware frequency
**        (8192, 4096, 2048, 1024, 512, ...)
**      - Period, onTime, and offTime are internally controlled with
**        approximately 19.5 msec resolution
*/

#define BEEP_SILENCE            BeepBeep(255, 0, 0, 0);

#define BEEP_KEYCLICK           BeepBeep(0, 20, 1, 1,           \
                                         128, 0, 20);

#define BEEP_SETPT_CHANGE       BeepBeep(8, 20, 1, 1,           \
                                         4096, 0, 20);

#define BEEP_WARNING            BeepBeep(64, 2000, 1, 1,        \
                                         512, 0, 2000);

#define BEEP_NON_FATAL_ERR      BeepBeep(128, 1500, 0, 2,       \
                                         512, 0, 500,           \
                                         1024, 750, 1250);

#define BEEP_STARTUP            BeepBeep(16, 300, 1, 2,         \
                                         1024, 0, 100,          \
                                         256, 200, 300);

#define BEEP_READY              BeepBeep(0, 1000, 3, 2,         \
                                         2048, 0, 100,          \
                                         2048, 200, 300);

/***********************/
/* FUNCTION PROTOTYPES */
/***********************/

void     SetWarningBeepEnabled (BIT8 status);
BIT8     GetWarningBeepEnabled (void);

/* beep.c */
void HandleBeep(void);
void BeepBeep(U_INT8 priority,
              U_INT16 period,
              U_INT8 cycles,
              U_INT32 tonesPerCycle,
              ...);  /* U_INT32 freq, U_INT32 on_msec, U_INT32 off_msec */
